﻿using System;
using System.Globalization;
using System.Windows.Data;

namespace LS.DicomViewer.Converters
{
    public class DoubleAddIntervalConverter : IValueConverter
    {
        public double IntervalValue { get; set; } = 0;

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return value == null ? IntervalValue : double.Parse(value.ToString()) + IntervalValue;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
